#!/bin/bash

r_host=$1
r_login=$2
r_dir=$3

print_usage()
{
   echo "Usage: $0 <remote host> <login> <remote dir>"
   echo "List the content of the given directory on the given"
   echo "remote host by using SSH protocol."
}

if [ "x$r_dir" == "x" ]; then
   echo "[ERROR] All arguments not available."
   print_usage
   exit 1
fi

#ssh root@172.24.61.53 "find /data/home/simlock/simlock_requests/send -name "*request_*.txt" -print"

ssh $r_login@$r_host "find $r_dir -name "*request_*.txt" -print"
